package logic;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import common.interfaces.StatisticsInterface;
import common.models.StatisticsModel;
import common.types.Pair;

public class StubStatisticsImpl implements StatisticsInterface {

    @Override
    public StatisticsModel getCurrentStatistics() {
        return generateStubStatisticsModel();
    }

    private StatisticsModel generateStubStatisticsModel() {
        StatisticsModel model = new StatisticsModel();
        
        model.setSuccesfulGuesses(60);
        model.setTotalGuesses(200);
        
        List<Pair<String,String>> pairs = new ArrayList<Pair<String,String>>();
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));
        pairs.add(new Pair<String, String>("Dan", "Dan"));
        pairs.add(new Pair<String, String>("Alon", "Alon"));
        pairs.add(new Pair<String, String>("Nir", "Nir"));
        pairs.add(new Pair<String, String>("Ofer", "Ofer"));    
        
        model.setGameHistory(pairs);
        
        Map<String, Integer> mostPlayed = new HashMap<String, Integer>();
        
        mostPlayed.put("Xa", 12);
        mostPlayed.put("Xaa", 100);
        mostPlayed.put("Xaaa", 20);
        mostPlayed.put("Xaaaa", 16);
        mostPlayed.put("Xaaaaa", 31);
        mostPlayed.put("b", 131);
        mostPlayed.put("Xv", 23);
        mostPlayed.put("Xbb", 53);
        mostPlayed.put("Xssaaaaa", 3);
        mostPlayed.put("Xssaaaaa3", 11);

        model.setMostPlayed(mostPlayed);
        
        return model;
        
    }
    
}
